﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace MyOA.UI.UserControl
{
    public partial class UserCalender : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// 开始时间 如果返回1年1月1日 则输入的格式不对
        /// </summary>
        public DateTime StartTime
        {
            get
            {
                DateTime dt = new DateTime(1, 1, 1);
                string a = txtStart.Text;
                try
                {
                    dt = DateTime.Parse(txtStart.Text);
                }
                catch (Exception ex)
                {

                }

                return dt;
            }
            set
            {
                txtStart.Text = value.ToString();
            }

        }

        /// <summary>
        /// 结束时间 如果返回1年1月1日 则输入的格式不对
        /// </summary>
        public DateTime EndTime
        {
            get
            {
                DateTime dt = new DateTime(1, 1, 1);
                try
                {
                    dt = DateTime.Parse(txtEnd.Text);
                }
                catch (Exception ex)
                {

                }


                return dt;
            }
            set
            {
                txtEnd.Text = value.ToString();
            }
        }
    }
}